Assign license to User

Assigns or updates license bundles for the specified user.

PUT{accelqLoginUrl}/awb/api/2.0/{tenantCode}/administration/users/license

Headers

HeaderValue
user_idLogin username (email)
api_keyAPI key of the user for authentication
Content-Typeapplication/json
Acceptapplication/json

Parameters

ParameterTypeRequiredDescription
accelqLoginUrlstringYesThe AccelQ login URL for API access.
tenantCodestringYesTenant code for identifying the organization.
user_idstringYesLogin username (email)
api_keystringYesAPI key of the user for authentication

Request Body

json
{
  "userPid": "25",
  "assignedLicenses": [
    {
      "subscriptionId": 1724156779826,
      "licenseBundleId": 3
    }
  ]
}

Responses

200 - User license successfully assigned

json
{
  "userPid": 25,
  "firstName": "Test",
  "lastName": "User2",
  "email": "testuser2@accelq.com",
  "active": true,
  "tenantAdmin": false,
  "assignedLicenses": [
    {
      "subscriptionId": "1724156779826",
      "subscriptionName": "1724156779826",
      "licenseBundleId": 3,
      "products": [
        "WEB",
        "Desktop"
      ],
      "subscriptionType": "Enterprise"
    }
  ],
  "assignedProjects": [
    {
      "projectName": "accelqProject",
      "roleName": "SME",
      "isAdmin": false
    }
  ]
}

400 - Bad Request Error

json
{
  "error": "At least one license must be assigned"
}

403 - Forbidden - User does not have permission to assign licenses

json
{
  "error": "User does not have authorization to access this feature"
}

404 - User not found

json
{
  "error": "User with pid : '26' doesnot exist."
}

cURL Command Builder

URL Parameters

Headers

Request Sample (cURL)

curl -X PUT "${{accelqLoginUrl}}/awb/api/2.0/${{tenantCode}}/administration/users/license" \
  -H "user_id: ${{user_id}}" \
  -H "api_key: ${{api_key}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "userPid": "25",
  "assignedLicenses": [
    {
      "subscriptionId": 1724156779826,
      "licenseBundleId": 3
    }
  ]
}'